package structural.adapter;


public class Phone {

    // 这里传入的是 v5接口,实现了这个接口的类也可以传入
    public static void inputPower(V5Power v5Power) {
        int provideV5Power = v5Power.power();
        System.out.println("需要的是5V充电,现在是" + provideV5Power + "V");
    }

    public static void main(String[] args) {
        V220Power v220Power = new V220Power();
        V5Power v5Power = new Adapter(v220Power);
        inputPower(v5Power);
    }
}
